using System.ComponentModel.DataAnnotations;

namespace OutpatientApi.DTO
{
    /// <summary>
    /// 门诊结账请求DTO
    /// </summary>
    public class CheckoutRequestDto
    {
        /// <summary>
        /// 挂号单号
        /// </summary>
        [Required(ErrorMessage = "挂号单号不能为空")]
        public string RegisterNo { get; set; }

        /// <summary>
        /// 病人姓名
        /// </summary>
        [Required(ErrorMessage = "病人姓名不能为空")]
        public string PatientName { get; set; }

        /// <summary>
        /// 总金额
        /// </summary>
        [Required(ErrorMessage = "总金额不能为空")]
        [Range(0.01, double.MaxValue, ErrorMessage = "总金额必须大于0")]
        public decimal TotalAmount { get; set; }

        /// <summary>
        /// 支付金额
        /// </summary>
        [Required(ErrorMessage = "支付金额不能为空")]
        [Range(0.01, double.MaxValue, ErrorMessage = "支付金额必须大于0")]
        public decimal PaymentAmount { get; set; }

        /// <summary>
        /// 找零金额
        /// </summary>
        public decimal ChangeAmount { get; set; }

        /// <summary>
        /// 是否打印发票
        /// </summary>
        public bool PrintInvoice { get; set; }

        /// <summary>
        /// 操作员ID（可选）
        /// </summary>
        public int? OperatorId { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remarks { get; set; }
    }

    /// <summary>
    /// 门诊结账响应DTO
    /// </summary>
    public class CheckoutResponseDto
    {
        /// <summary>
        /// 结账ID
        /// </summary>
        public int CheckoutId { get; set; }

        /// <summary>
        /// 挂号单号
        /// </summary>
        public string RegisterNo { get; set; }

        /// <summary>
        /// 病人姓名
        /// </summary>
        public string PatientName { get; set; }

        /// <summary>
        /// 总金额
        /// </summary>
        public decimal TotalAmount { get; set; }

        /// <summary>
        /// 支付金额
        /// </summary>
        public decimal PaymentAmount { get; set; }

        /// <summary>
        /// 找零金额
        /// </summary>
        public decimal ChangeAmount { get; set; }

        /// <summary>
        /// 结账时间
        /// </summary>
        public DateTime CheckoutTime { get; set; }

        /// <summary>
        /// 发票号
        /// </summary>
        public string InvoiceNumber { get; set; }

        /// <summary>
        /// 是否打印发票
        /// </summary>
        public bool PrintInvoice { get; set; }

        /// <summary>
        /// 操作员ID
        /// </summary>
        public int? OperatorId { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remarks { get; set; }
    }
} 